package SEApp.boxes.albums
{
	import UIFree.controls.uif_label;
	import UIFree.uif_component;
	
	import flash.geom.Rectangle;

	public class se_previewItemNamed extends se_previewItem {
		private var _nameCtrl: uif_label;
		public function se_previewItemNamed(parent:uif_component, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0, a_data: Object=null, styleClass:String='') {
			super(parent, ax, ay, awidth, aheight, a_data, styleClass);
			var inner: Rectangle = getInner();
			var hp: Number = inner.height * 0.3;
			_prevImage.height = inner.height - hp;
			if (_dataItem != null) _prevImage.loadSource(_dataItem.preview);
			_nameCtrl = new uif_label(this, inner.x, inner.y + _prevImage.height, inner.width, hp, style['nameCtrl']);
			_nameCtrl.text = (_dataItem != null)?_dataItem.name:'';
		}
		
		public function get nameCtrl(): uif_label {
			return _nameCtrl;
		}
	}
}